package com.ws.user.user.dao;

import com.ws.user.user.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper{

   public List<User> list(User params);

   @Select("select u.*,rl.id as user_role_id  from user_role rl left join user u on u.id=rl.user_id where u.is_deleted='N' and rl.role_id=#{roleId}")
    List<User> listByRoleId(@Param("roleId") String roleId);
}